import {
  awardApi,
  certificateApi,
  contractApi,
  educationApi,
  emergencylinkApi,
  expertApi,
  familyApi,
  jobApi,
  outsendApi,
  punishApi,
  scientificApi,
  technologyApi,
  yearcheckApi,
  retireApi,
  transferApi,
} from "@/service/personalSet";

// 获取对应的api
export const getCurrentApi = (activeKey: string): any => {
  const apis: {
    [key: string]: any
  } = {
    education: educationApi,
    technical: technologyApi,
    certificate: certificateApi,
    expert: expertApi,
    job: jobApi,
    contract: contractApi,
    award: awardApi,
    punish: punishApi,
    outsend: outsendApi,
    yearcheck: yearcheckApi,
    family: familyApi,
    emergencyLink: emergencylinkApi,
    scientific: scientificApi,
    retire: retireApi,
    transfer: transferApi,
  }

  return apis[activeKey] || null
}
